// 导入所有API模块
import { restaurantApi } from './restaurant'
import { drawApi } from './draw'
import { markApi } from './mark'

// 统一导出所有API模块
export { restaurantApi, drawApi, markApi }

// 导出类型
export type {
  Restaurant,
  CreateRestaurantRequest,
  UpdateRestaurantRequest,
  DrawHistory,
  DrawResponse,
  RestaurantMark,
  CreateMarkRequest,
  PaginationParams,
  RestaurantFilters,
  ApiResponse,
  ErrorResponse,
  PaginatedRestaurants,
  PaginatedDrawHistory,
  PaginatedMarks,
  DrawStats,
  MarkStats,
  RestaurantDrawCount,
  RestaurantMarkCheck,
  DrawFilterDto,
  CreateRestaurantDto,
  UpdateRestaurantDto,
  CreateMarkDto,
  DateFilter
} from './types'

// 创建API实例的工厂函数
export const createApiClient = () => {
  return {
    restaurant: restaurantApi,
    draw: drawApi,
    mark: markApi
  }
}

// 默认API客户端实例
export const api = createApiClient()

// 便捷的API调用方法
export default api